module UserHelper

  # helper method used in login system and account controller
  def init_settings(user)
    user.settings = UserSettings.new if user.settings == nil
    session[:selected_state] = user.settings.default_state
    user.last_login = Time.now
    user.save
  end

end
